package com.feihao.zhou.aop;

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

@Component
@Aspect
public class AOPAdvice2 {

    @Pointcut("execution(* *.*(..))")
    public void pt(){}

    @Before("pt()")
    public void function(){
        System.out.println("共性方法  before！！");
    }

    @After("pt()")
    public void after(){
        System.out.println("共性方法  after！！");
    }

}

